<?php

class AjaxController extends Controller {

    public function getIndex() {
        echo 'gg';
    }

    public function getContent($param) {
        
    }

    public function getTopic($skip = 0) {
        $topics = Topic::take(5)->skip($skip)->get();

        return Response::json($topics);
    }

    public function getGoogle() {
        $gg = new GoogleImages(); 
        return $gg->get_images(Input::get('query'));
    }
    
    public function getUrl(){
        $ui = new UrlImages;
        
        return $ui->test(Input::get('query'));
    }
}
